﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

namespace MyVocationSpace
{
    public partial class Enquiry : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string name = txtName.Text;
            string email = txtEmail.Text;
            string enquiry = ddlType.Text;
            string desc = txtDesc.Text;

            string strContent = "<table align=\"center\" width=\"600px\"  " +
                                    "style=\"padding-left:15px; font-family:arial ;font-size:16px;\" cellpadding=\"5px\">" +
                                    "<tr><td><b>Dear Sir/Madam,</b></td></tr>" +
                                    "<tr><td><b>You have received enquiry details : </b></td></tr>" +
                                    "<tr><td><b>Name : </b>" + name + " </td></tr>" +
                                    "<tr><td><b>Email ID : </b>" + email  + " </td></tr>" +
                                    "<tr><td><b>Enquiry for : </b>" + enquiry + " </td></tr>" +
                                    "<tr><td><b>Description : </b>" + desc + " </td></tr>" +
                                    "<tr><td>" +
                                    "</td></tr>" +
                                    "<tr><td><br/>Thank You,<br/><a href=\"http://www.myvocationspace.com\">www.myvocationspace.com</a><br><br><div style=\"width:200px;\"><img src=\"cid:companylogo\"></div></td></tr>" +

                                     "</table>";

            //Mail.SEndEmail("Enquiry from Website www.nsindustries.in", strContent);

           // Mail.SendEmailUser("", Email, "Acknowledgement from Website www.nsindustries.in", strContent);

            string subject = "Enquiry from website www.myvocationspace.com...";
            BAL.Common.SendEmail("", ConfigurationManager.AppSettings["AdminID"].ToString(), subject, strContent);

            idSpanMsg.Style.Add("display", "block");
            idSpanMsg.InnerHtml = "Thank You for contacting us, we will get back to you soon...";

            txtDesc.Text = "";
            txtEmail.Text = "";
            txtName.Text="";
            ddlType.SelectedValue = "-1";


        }
    }
}